home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / basic / ace24dist.lha / ace24.lha / include / graphics / Copper.h < prev    next >
C/C++ Source or Header  |  1996-09-10  |  4KB  |  130 lines

  1. #ifndef GRAPHICS_COPPER_H
  2. #define GRAPHICS_COPPER_H 1
  3. /*
  4. ** copper.h for ACE Basic
  5. **
  6. ** Note: Translated to ACE by ConvertC2ACE
  7. **       @ MapMeadow Software, Nils Sjoholm
  8. **
  9. **
  10. ** Date: 09/01/95
  11. **
  12. **
  13. */
  14.  
  15. /*
  16. ** This are the StructPointer defines for copper.h
  17. */
  18. #ifndef CopInsPtr
  19. #define CopInsPtr ADDRESS
  20. #endif
  21. #ifndef CopListPtr
  22. #define CopListPtr ADDRESS
  23. #endif
  24. #ifndef UCopListPtr
  25. #define UCopListPtr ADDRESS
  26. #endif
  27. #ifndef copinitPtr
  28. #define copinitPtr ADDRESS
  29. #endif
  30. #ifndef cprlistPtr
  31. #define cprlistPtr ADDRESS
  32. #endif
  33. /*
  34. ** End of StructPointer defines for copper.h
  35. */
  36.         
  37. #ifndef EXEC_TYPES_H
  38. #include <exec/types.h>
  39. #endif
  40.  
  41.  
  42. #define COPPER_MOVE 0       /* pseude opcode for move #XXXX, dir */
  43. #define COPPER_WAIT 1       /* pseudo opcode for wait y, x */
  44. #define CPRNXTBUF   2       /* continue processing with next buffer */
  45. #define CPR_NT_LOF  &H8000  /* copper instruction only for SHORTINT frames */
  46. #define CPR_NT_SHT  &H4000  /* copper instruction only for LONGINT frames */
  47. #define CPR_NT_SYS  &H2000  /* copper user instruction only */
  48.  
  49. STRUCT CopIns
  50.  
  51.     SHORTINT   OpCode  /* 0 = move,  1 = wait */
  52.  
  53.     SHORTINT VWaitPos         /* vertical beam WAIT */
  54.     SHORTINT DestAddr         /* destination ADDRESS of copper move */
  55.  
  56. END STRUCT 
  57.  
  58. /* shorthand FOR above */
  59. /*
  60. #define NXTLIST     u3.nxtlist
  61. #define VWAITPOS    u3.u4.u1.VWaitPos
  62. #define DESTADDR    u3.u4.u1.DestAddr
  63. #define HWAITPOS    u3.u4.u2.HWaitPos
  64. #define DESTDATA    u3.u4.u2.DestData
  65. */
  66.  
  67. /* structure of cprlist that points to list that hardware actually executes */
  68. STRUCT cprlist
  69.  
  70.     cprlistPtr  _Next 
  71.     ADDRESS   start      /* start of copper list */
  72.     SHORTINT   MaxCount        /* number of LONGINT instructions */
  73. END STRUCT 
  74.  
  75. STRUCT CopList
  76.  
  77.     CopListPtr  _Next   /* next block for this copper list */
  78.     CopListPtr  _CopList   /* system use */
  79.     ViewPortPtr  _ViewPort     /* system use */
  80.     CopInsPtr  CopIns  /* start of this block */
  81.     CopInsPtr  CopPtr  /* intermediate ptr */
  82.     ADDRESS   CopLStart      /* mrgcop fills this in for LONGINT Frame*/
  83.     ADDRESS   CopSStart      /* mrgcop fills this in for SHORTINT Frame*/
  84.     SHORTINT   Count       /* intermediate counter */
  85.     SHORTINT   MaxCount        /* max # of copins for this block */
  86.     SHORTINT   DyOffset        /* offset this copper list vertical waits */
  87. #ifdef V1_3
  88.     ADDRESS   Cop2Start 
  89.     ADDRESS   Cop3Start 
  90.     ADDRESS   Cop4Start 
  91.     ADDRESS   Cop5Start 
  92. #endif
  93.     SHORTINT  SLRepeat 
  94.     SHORTINT  Flags 
  95. END STRUCT 
  96.  
  97. /* These CopList->Flags are private */
  98. #define EXACT_LINE 1
  99. #define HALF_LINE 2
  100.  
  101.  
  102. STRUCT UCopList
  103.  
  104.     UCopListPtr  _Next 
  105.     CopListPtr  FirstCopList  /* head node of this copper list */
  106.     CopListPtr  CopList       /* node in use */
  107. END STRUCT 
  108.  
  109. /* Private graphics data structure. This structure has changed in the past, 
  110.  * and will continue to change in the future. Do Not Touch!
  111.  */
  112.  
  113. STRUCT copinit
  114.  
  115.     STRING vsync_hblank SIZE 4   /*  2*SIZEOF(SHORTINT)      */
  116.     STRING diagstrt SIZE 24      /*  12*SIZEOF(SHORTINT)     */  /* copper LIST FOR first bitplane */
  117.     STRING fm0 SIZE 4            /*  2*SIZEOF(SHORTINT)      */
  118.     STRING diwstart SIZE 20      /*  10*SIZEOF(SHORTINT)     */
  119.     STRING bplcon2 SIZE 4        /*  2*SIZEOF(SHORTINT)      */
  120.     STRING sprfix SIZE 32        /*  2*8*SIZEOF(SHORTINT)    */
  121.     STRING sprstrtup SIZE 64     /*  (2*8*2)*SIZEOF(SHORTINT)*/
  122.     STRING wait14 SIZE 4         /*  2*SIZEOF(SHORTINT)      */
  123.     STRING norm_hblank SIZE 4    /*  2*SIZEOF(SHORTINT)      */
  124.     STRING jump SIZE 4           /*  2*SIZEOF(SHORTINT)      */
  125.     STRING wait_forever SIZE 12  /*  6*SIZEOF(SHORTINT)      */
  126.     STRING sprstop SIZE 16       /*  8*SIZEOF(SHORTINT)      */
  127. END STRUCT 
  128.  
  129. #endif  /* GRAPHICS_COPPER_H */
  130.